/**
 * Generic
 */
html {
  font-size: $typographic-root-font-size;
}

body {
  margin: 0;
  font-family: $typographic-font-family;
  color: $typographic-base-font-color;
  line-height: $typographic-base-line-height;
  font-size: $typographic-base-font-size;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: $typographic-font-family;
  font-weight: 600;
}

h1 {
  font-size: $typographic-base-font-size * 2.5;
  @include line-height(2);
  @include margin-top(3);
  @include margin-bottom(1);
}

h2 {
  font-size: $typographic-base-font-size * 1.6875;
  @include line-height(1.5);
  @include margin-top(1.5);
  @include margin-bottom(.5);
}

h3 {
  font-size: $typographic-base-font-size * 1.375;
  @include line-height(1);
  @include margin-top(1.5);
  @include margin-bottom(.5);
}

h4 {
  font-size: $typographic-base-font-size * 1.2;
  @include line-height(1);
  @include margin-top(1.125);
  @include margin-bottom(.5);
}

h5 {
  font-size: $typographic-base-font-size;
  @include line-height(1);
  @include margin-top(1.875);
  @include margin-bottom(.5);
}

h6 {
  font-size: $typographic-base-font-size;
  @include line-height(1);
  @include margin-top(1.875);
  @include margin-bottom(.5);
}

img {
  border: 0;
  max-width: 100%;
  display: block;
  margin: inherit auto;
}

hr {
  @include margin-top(2);
  @include margin-bottom(2);
  margin-right: auto;
  margin-left: auto;
  border: 0;
  display: block;
  height: 2px;
  background-color: $color-gray;
}

a {
  color: $typographic-link-p-font-color;
  text-decoration: none;
  @include transition(color);

  &:hover, &:focus, &:active {
    color: $typographic-link-s-font-color;
  }
}

b, strong {
  font-weight: bold;
}

ul, ol {
  @include margin-bottom(1);
  @include padding-equal(0);

  & li {
    padding: 0;
    margin-bottom: 12px;
    margin-left: 30px;
  }
}

p {
  @include line-height(1);
  @include margin-bottom(0.75);
}

figure {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  @include line-height(.75);
  @include margin-top(.25);
  @include margin-bottom(.25);
  color: $color-base;
  font-size: $typographic-small-font-size;
  text-align: center;
}

button {
  border: none;
  outline: none;
  background-color: $color-primary;
  color: white;
  font-size: $typographic-base-font-size * 0.75;
  font-weight: bold;
  padding: 10px 20px;
  @include transition(background-color);

  &:hover {
    background-color: $color-secondary;
    cursor: pointer;
  }
}

@include breakpoint-sm {
  figure.float-left,
  figure.float-right {
    max-width: 310px;
    @include padding(0, 1, 0, 1);
  }

  .float-right {
    float: right;
  }

  .float-left {
    float: left;
  }
}

input {
  border: none;
  outline: none;
  text-align: center;

  &:focus {
    outline: none;
  }
}

@include breakpoint-md {
  h1 {
    @include margin-top(4);
  }

  h2 {
    @include margin-top(2);
  }

  h3 {
    @include margin-top(2);
  }

  h4 {
    @include margin-top(1.5);
  }

  h5 {
    @include margin-top(2.5);
  }

  h6 {
    @include margin-top(2.5);
  }

  p {
    @include margin-bottom(1.125);
  }

  button {
    font-size: $typographic-base-font-size * 0.9;
    padding: 15px 30px;
  }
}
